solving trigonometric equations with identities